import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Scanner;

public class 第三题 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double[][] arr = new double[30][30];
        for (int i = 0; i < 29; i++) {
            for (int j = 0; j < i+1; j++) {
                arr[i][j]=sc.nextInt();
            }
        }
        for (int i = 0; i < 29; i++) {
            for (int j = 0; j < 29; j++) {
                arr[i+1][j] += arr[i][j]/2;
                arr[i+1][j+1] += arr[i][j]/2;
            }
        }

//        for (int i = 0; i < 30; i++) {
//            for (int j = 0; j < 30; j++) {
//                System.out.print(arr[i][j]+" ");
//            }
//            System.out.println();
//        }

        double[] c = new double[30];
        for (int i = 0; i < 30; i++) {
            c[i] = arr[29][i];
        }

        Arrays.sort(c);
        double count = 2086458231/c[0];
        System.out.println(c[0]*count+" "+c[29]*count);
    }
}
//2086458231
//2086458231
//72665192664
//72665192664